package com.ruoyi.gcgl.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.gcgl.domain.YyProjectMilestone;
import com.ruoyi.gcgl.mapper.YyProjectMilestoneMapper;
import com.ruoyi.gcgl.service.IYyProjectMilestoneService;

/**
 * 项目里程碑Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-07
 */
@Service
public class YyProjectMilestoneServiceImpl implements IYyProjectMilestoneService 
{
    @Autowired
    private YyProjectMilestoneMapper sjProjectMilestoneMapper;

    /**
     * 查询项目里程碑
     * 
     * @param id 项目里程碑主键
     * @return 项目里程碑
     */
    @Override
    public YyProjectMilestone selectSjProjectMilestoneById(Long id)
    {
        return sjProjectMilestoneMapper.selectSjProjectMilestoneById(id);
    }

    /**
     * 查询项目里程碑列表
     * 
     * @param sjProjectMilestone 项目里程碑
     * @return 项目里程碑
     */
    @Override
    public List<YyProjectMilestone> selectSjProjectMilestoneList(YyProjectMilestone sjProjectMilestone)
    {
        return sjProjectMilestoneMapper.selectSjProjectMilestoneList(sjProjectMilestone);
    }

    /**
     * 新增项目里程碑
     * 
     * @param sjProjectMilestone 项目里程碑
     * @return 结果
     */
    @Override
    public int insertSjProjectMilestone(YyProjectMilestone sjProjectMilestone)
    {
        return sjProjectMilestoneMapper.insertSjProjectMilestone(sjProjectMilestone);
    }

    /**
     * 修改项目里程碑
     * 
     * @param sjProjectMilestone 项目里程碑
     * @return 结果
     */
    @Override
    public int updateSjProjectMilestone(YyProjectMilestone sjProjectMilestone)
    {
        return sjProjectMilestoneMapper.updateSjProjectMilestone(sjProjectMilestone);
    }

    /**
     * 批量删除项目里程碑
     * 
     * @param ids 需要删除的项目里程碑主键
     * @return 结果
     */
    @Override
    public int deleteSjProjectMilestoneByIds(String ids)
    {
        return sjProjectMilestoneMapper.deleteSjProjectMilestoneByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除项目里程碑信息
     * 
     * @param id 项目里程碑主键
     * @return 结果
     */
    @Override
    public int deleteSjProjectMilestoneById(Long id)
    {
        return sjProjectMilestoneMapper.deleteSjProjectMilestoneById(id);
    }
}
